package similarite;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
// this method get all images in the directory  " src/imageSift/"

public class GetImage {

    public GetImage(String directory) {
        this.directory = directory;
    }
    private String directory;

    public String getDirectory() {
        return directory;
    }

    public void setDirectory(String directory) {
        this.directory = directory;
    }

    public List<File> loadImage() {

        //Change the directory where the image are existing
        File di = new File(directory);
        // load all picture in the directory 
        File fl[] = di.listFiles();
        List<File> list = new ArrayList();
        for (File f : fl) {
        	if(!f.getName().equals(".svn") && !f.getName().equals(".DS_Store")) {
        		System.out.println("NAMES : "+f.getName());
                list.add(f);
            }

        }
        // cette partie est optionelle juste pour tester a supprimer  

        return list;
    }
}